<template>
  <div>
    <Breadcrumb></Breadcrumb>
    <el-card>
      <el-table :data="RightData" style="width: 100%">
        <el-table-column type="index" label="#" width="50"> </el-table-column>
        <el-table-column prop="authName" label="权限名称" align="center">
        </el-table-column>
        <el-table-column prop="path" label="路径" align="center">
        </el-table-column>
        <el-table-column prop="level" label="级别" align="center">
          <template slot-scope="scope">
            <el-tag v-if="scope.row.level == 0">一级</el-tag>
            <el-tag type="success" v-if="scope.row.level == 1">二级</el-tag>
            <el-tag type="warning" v-if="scope.row.level == 2">三级</el-tag>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<script>
import { getRight } from "@/utils/axios/rightApi";
import Breadcrumb from "@/mixins/mixin.vue";
export default {
  components:{Breadcrumb},
  data() {
    return {
      RightData: [],
      shu: [],
    };
  },
  mounted() {
    this.getRi();
  },
  methods: {
    async getRi() {
      let { data } = await getRight("list");
      this.RightData = data.data;

      console.log(this.RightData);
    },
  },
};
</script>